<!DOCTYPE html>












  


<html class="theme-next mist use-motion" lang="zh-CN">
<head><meta name="generator" content="Hexo 3.8.0">
  <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">


  <script>
  (function(i,s,o,g,r,a,m){i["DaoVoiceObject"]=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;a.charset="utf-8";m.parentNode.insertBefore(a,m)})(window,document,"script",('https:' == document.location.protocol ? 'https:' : 'http:') + "//widget.daovoice.io/widget/0f81ff2f.js","daovoice")
  daovoice('init', {
      app_id: "15fc8e87"
    });
  daovoice('update');
  </script>






  
  
    
    
  <script src="/lib/pace/pace.min.js?v=1.0.2"></script>
  <link href="/lib/pace/pace-theme-minimal.min.css?v=1.0.2" rel="stylesheet">







<meta http-equiv="Cache-Control" content="no-transform">
<meta http-equiv="Cache-Control" content="no-siteapp">






















<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css">

<link href="/css/main.css?v=6.3.0" rel="stylesheet" type="text/css">


  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png?v=6.3.0">


  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png?v=6.3.0">


  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png?v=6.3.0">


  <link rel="mask-icon" href="/images/logo.svg?v=6.3.0" color="#222">









<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Mist',
    version: '6.3.0',
    sidebar: {"position":"left","display":"post","offset":12,"b2t":true,"scrollpercent":true,"onmobile":false},
    fancybox: false,
    fastclick: false,
    lazyload: false,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>


  




  <meta name="description" content="Docker、容器和镜像的简介和常用命令">
<meta name="keywords" content="Docker">
<meta property="og:type" content="article">
<meta property="og:title" content="学习Docker之Docker、容器和镜像的简介和常用命令">
<meta property="og:url" content="http://blog.wangxc.club/2018/01/22/学习Docker之Docker、容器和镜像的简介和常用命令/index.html">
<meta property="og:site_name" content="冬与晨">
<meta property="og:description" content="Docker、容器和镜像的简介和常用命令">
<meta property="og:locale" content="zh-CN">
<meta property="og:image" content="https://i.loli.net/2018/01/21/5a649b380cd7d.png">
<meta property="og:image" content="https://i.loli.net/2018/01/21/5a64ad97e2110.png">
<meta property="og:updated_time" content="2018-06-29T13:58:50.287Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="学习Docker之Docker、容器和镜像的简介和常用命令">
<meta name="twitter:description" content="Docker、容器和镜像的简介和常用命令">
<meta name="twitter:image" content="https://i.loli.net/2018/01/21/5a649b380cd7d.png">






  <link rel="canonical" href="http://blog.wangxc.club/2018/01/22/学习Docker之Docker、容器和镜像的简介和常用命令/">



<script type="text/javascript" id="page.configurations">
  CONFIG.page = {
    sidebar: "",
  };
</script>

  <title>学习Docker之Docker、容器和镜像的简介和常用命令 | 冬与晨</title>
  




<script async src="https://www.googletagmanager.com/gtag/js?id=UA-102769182-1"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'UA-102769182-1');
</script>



  <script type="text/javascript">
    var _hmt = _hmt || [];
    (function() {
      var hm = document.createElement("script");
      hm.src = "https://hm.baidu.com/hm.js?809d5610fca8eaff344d9a698536110d";
      var s = document.getElementsByTagName("script")[0];
      s.parentNode.insertBefore(hm, s);
    })();
  </script>




  <noscript>
  <style type="text/css">
    .use-motion .motion-element,
    .use-motion .brand,
    .use-motion .menu-item,
    .sidebar-inner,
    .use-motion .post-block,
    .use-motion .pagination,
    .use-motion .comments,
    .use-motion .post-header,
    .use-motion .post-body,
    .use-motion .collection-title { opacity: initial; }

    .use-motion .logo,
    .use-motion .site-title,
    .use-motion .site-subtitle {
      opacity: initial;
      top: initial;
    }

    .use-motion {
      .logo-line-before i { left: initial; }
      .logo-line-after i { right: initial; }
    }
  </style>
</noscript>

</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-CN">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail">
    <div class="headband">
    </div>
<a href="https://github.com/vector4wang"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub"></a>
    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/" class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">冬与晨</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
    
  </div>

  <div class="site-nav-toggle">
    <button aria-label="切换导航栏">
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>



<nav class="site-nav">
  
    <ul id="menu" class="menu">
      
        
        
        
          
          <li class="menu-item menu-item-home">
    <a href="/" rel="section">
      <i class="menu-item-icon fa fa-fw fa-home"></i> <br>首页</a>
  </li>
        
        
        
          
          <li class="menu-item menu-item-about">
    <a href="/about/" rel="section">
      <i class="menu-item-icon fa fa-fw fa-user"></i> <br>关于</a>
  </li>
        
        
        
          
          <li class="menu-item menu-item-tags">
    <a href="/tags/" rel="section">
      <i class="menu-item-icon fa fa-fw fa-tags"></i> <br>标签</a>
  </li>
        
        
        
          
          <li class="menu-item menu-item-categories">
    <a href="/categories/" rel="section">
      <i class="menu-item-icon fa fa-fw fa-th"></i> <br>分类</a>
  </li>
        
        
        
          
          <li class="menu-item menu-item-archives">
    <a href="/archives/" rel="section">
      <i class="menu-item-icon fa fa-fw fa-archive"></i> <br>归档</a>
  </li>
        
        
        
          
          <li class="menu-item menu-item-commonweal">
    <a href="/404/" rel="section">
      <i class="menu-item-icon fa fa-fw fa-heartbeat"></i> <br>公益 404</a>
  </li>

      
      
    </ul>
  

  
    

  

  
</nav>



  



</div>
    </header>

    


    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://blog.wangxc.club/2018/01/22/学习Docker之Docker、容器和镜像的简介和常用命令/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="wangxc">
      <meta itemprop="description" content="革命尚未成功，同志还需努力~">
      <meta itemprop="image" content="/images/avatar.jpg">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="冬与晨">
    </span>

    
      <header class="post-header">

        
        
          <h2 class="post-title" itemprop="name headline">学习Docker之Docker、容器和镜像的简介和常用命令
              
            
          </h2>
        

        <div class="post-meta">
          <span class="post-time">

            
            
            

            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              

              
                
              

              <time title="创建时间：2018-01-22 00:02:38" itemprop="dateCreated datePublished" datetime="2018-01-22T00:02:38+08:00">2018-01-22</time>
            

            
              

              
                
                <span class="post-meta-divider">|</span>
                

                <span class="post-meta-item-icon">
                  <i class="fa fa-calendar-check-o"></i>
                </span>
                
                  <span class="post-meta-item-text">更新于</span>
                
                <time title="修改时间：2018-06-29 21:58:50" itemprop="dateModified" datetime="2018-06-29T21:58:50+08:00">2018-06-29</time>
              
            
          </span>

          
            <span class="post-category">
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/技术/" itemprop="url" rel="index"><span itemprop="name">技术</span></a></span>

                
                
              
            </span>
          

          
            
              <span class="post-comments-count">
                <span class="post-meta-divider">|</span>
                <span class="post-meta-item-icon">
                  <i class="fa fa-comment-o"></i>
                </span>
                <a href="/2018/01/22/学习Docker之Docker、容器和镜像的简介和常用命令/#comments" itemprop="discussionUrl">
                  <span class="post-meta-item-text">评论数：</span> <span class="post-comments-count valine-comment-count" data-xid="/2018/01/22/学习Docker之Docker、容器和镜像的简介和常用命令/" itemprop="commentCount"></span>
                </a>
              </span>
            
          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <p>Docker、容器和镜像的简介和常用命令</p>
<a id="more"></a>

<iframe frameborder="no" border="0" marginwidth="0" marginheight="0" width="330" height="86" src="//music.163.com/outchain/player?type=2&id=1167022&auto=1&height=66"></iframe>

<p>第一篇通过部署SpringBoot项目来见识到了Docker的强大<a href="http://vector4wang.tk/2018/01/18/%E5%AD%A6%E4%B9%A0Docker%E4%B9%8BDocker%E5%88%9D%E4%BD%93%E9%AA%8C-SpringBoot%E9%9B%86%E6%88%90Docker%E7%9A%84%E9%83%A8%E7%BD%B2%E3%80%81%E5%8F%91%E5%B8%83%E4%B8%8E%E5%BA%94%E7%94%A8/" target="_blank" rel="noopener">点我</a>，接下来就来简单聊聊什么是Docker?</p>
<ul>
<li>什么是Docker</li>
<li>镜像与容器</li>
<li>Docker常用命令</li>
</ul>
<h2 id="问题"><a href="#问题" class="headerlink" title="问题"></a>问题</h2><ul>
<li><p>小王在工作之余接了个私单，功能很简单，开发完之后只要在本地将程序跑起来，就能完成客户的需求。于是小王每天晚上花个一两个小时去开发，一周之内搞定了，然而在远程给客户部署的时候，出现了各种各样的问题，光配置环境就花了两三个小时，好不容易搞定了一台机器，客户说“辛苦了，还有十几台要帮我安装一下”，小王听完差点一口老血喷了出来。</p>
</li>
<li><p>工作上小王开发的服务要部署在各个环境上，有的环境还不止一两个节点，一些环境的配置反反复复的去做花费了小王好长的时间，真的是开发十分钟，配置两小时啊。</p>
</li>
</ul>
<p>这些问题看完下面相信你心中就会有解决的办法了。</p>
<h2 id="什么是Docker"><a href="#什么是Docker" class="headerlink" title="什么是Docker"></a>什么是Docker</h2><blockquote>
<p><em>Docker是一个能够把开发的应用程序自动部署到容器的开源引擎。由Docker公司的团队编写，基于Apache2.0开源授权协议发行<br>Docker在虚拟化的容器执行环境中增加了一个应用程序部署引擎。改引擎的目标就是提供一个轻量、快速的环境，能够运行开发者的程序，并方便高效地将程序从开发者的笔记本部署到测试环境，然后再部署到生产环境。Docker及其简洁，它所需的全部环境只是一台仅仅安装了兼容版本的Linux内核和二进制文件最小限制的宿主机。</em><br>摘自《THE DOCKER BOOK》</p>
</blockquote>
<p>简单的说，程序员只要把程序开发好，然后通过Docker就可以很简单很快速的将服务部署在任何一个安装了Docker的机器上。这里引入了容器的概念，Docker可以帮用户构建和部署容器，用户只需要把自己的应用程序或服务打包放进容器即可。<br><a href="https://i.loli.net/2018/01/21/5a649b380cd7d.png" target="_blank" rel="noopener"><img src="https://i.loli.net/2018/01/21/5a649b380cd7d.png" alt="可爱的Docker.png"></a></p>
<p>Docker借鉴了标准集装箱的概念。标准集装箱将货物运往世界各地，Docker将这个模型运用到自己的设计哲学中，唯一不同的是：<em>集装箱运输货物，而Docker运输软件</em>。
每个容器都包含一个软件镜像，也就是说容器的“货物”，而且与真正的货物一样，容器里的软件镜像可以进行一些操作。例如：镜像可以被创建、启动、关闭、重启以及销毁。<br>和集装箱一样，Docker在执行上述操作时，并不关心容器里塞进了是么，它不管里面是Web服务器，还是数据库，或者是应用服务器是么的。所有容器都按照相同的方式将内容“装载”进去。<br>Docker也不关心用户要把容器运到何方：用户可以在自己的笔记本中构建容器，上传到Registry,然后下载一个物理的或虚拟的服务器来测试。像标准集装箱一样，Docker容器方便替换，可以叠加，易于分发，并且尽量通用。(内容都在《THE DOCKER BOOK》上)</p>
<h2 id="镜像与容器"><a href="#镜像与容器" class="headerlink" title="镜像与容器"></a>镜像与容器</h2><p><a href="http://dockone.io/article/783" target="_blank" rel="noopener">10张图带你深入理解Docker容器和镜像</a><br>网上介绍镜像与容器的文章很多，每个人都有自己的一套方式去理解，我的理解如下：</p>
<blockquote>
<p>容器好比是快递箱(集装箱)，镜像好比是集装箱里的货物(实物)。不同的货物在装配的时候所需要的填充物不同，如电子设备可能需要大量的泡沫纸、生鲜需要冰袋等等。这个时候Docker 就好比快递公司,Registry好比某购物平台。假如你想要某个实物(镜像)，快递公司会自动将将实物(镜像)打包好送到你的手里，开箱即用。你也可以自己制作实物(镜像)，然后指明这个镜像所需要的一些环境等配置，再一并提交给某购物平台(Registry)，方便他人使用。</p>
</blockquote>
<p>注意：这里只为方便的去理解容器与镜像，可能不同层次理解是不一样的。当然了深层次的容器和镜像并不是这样子的，后续的文章会继续介绍。</p>
<p>接下来就举两个例子</p>
<ul>
<li><p>通过已有镜像来启动<br>之前自己开发了一个服务放在了DockerHub上<a href="https://hub.docker.com/r/vector4wang/quick-docker/" target="_blank" rel="noopener">quick-docker</a>,这个是已知的，我们接下来直接在docker上运行这个启动它<br><a href="https://i.loli.net/2018/01/21/5a64ad97e2110.png" target="_blank" rel="noopener"><img src="https://i.loli.net/2018/01/21/5a64ad97e2110.png" alt="已知镜像运行.png"></a><br>如上图，直接运行一个镜像，docker会将镜像pull到本地，然后按照镜像所需要的环境去创建容器，然后去启动。</p>
</li>
<li><p>自己创建镜像并提交<br>这里就不在赘述，可参见上一篇博客<a href="http://vector4wang.tk/2018/01/18/%E5%AD%A6%E4%B9%A0Docker%E4%B9%8BDocker%E5%88%9D%E4%BD%93%E9%AA%8C-SpringBoot%E9%9B%86%E6%88%90Docker%E7%9A%84%E9%83%A8%E7%BD%B2%E3%80%81%E5%8F%91%E5%B8%83%E4%B8%8E%E5%BA%94%E7%94%A8/" target="_blank" rel="noopener">Docker初体验</a>，里面有详细的步骤。</p>
</li>
</ul>
<blockquote>
<p>注意：以上基于个人理解，只是便于去理解，容器和镜像的概念远不如此，并且容器与镜像比较重要，希望看到这里的客观多留意一下，多参看官方的文档。</p>
</blockquote>
<h2 id="Docker常用命令"><a href="#Docker常用命令" class="headerlink" title="Docker常用命令"></a>Docker常用命令</h2><h3 id="images"><a href="#images" class="headerlink" title="images"></a>images</h3><ul>
<li><p>搜索image<br><code>docker search image_name</code>  </p>
</li>
<li><p>下载image<br><code>docker pull image_name</code>  </p>
</li>
<li><p>列出镜像列表<br><code>docker images</code> 可加参数如下</p>
</li>
<li><p>a, –all=false Show all images;</p>
</li>
<li><p>-no-trunc=false Don’t truncate output; </p>
</li>
<li><p>q, –quiet=false Only show numeric IDs </p>
</li>
<li><p>删除images，删除images，通过image的id来指定删除谁<br><code>docker rmi &lt;image id&gt;</code></p>
</li>
<li><p>删除images id 为none的<br><code>docker rmi $(docker images | grep &quot;^&lt;none&gt;&quot; | awk &quot;{print $3}&quot;)</code></p>
</li>
<li><p>删除全部image<br><code>docker rmi $(docker images -q)</code></p>
</li>
<li><p>显示一个镜像的历史<br><code>docker history image_name</code> 可加参数</p>
</li>
<li><p>-no-trunc=false Don’t truncate output;</p>
</li>
<li><p>q, –quiet=false Only show numeric IDs  </p>
</li>
</ul>
<h3 id="container"><a href="#container" class="headerlink" title="container"></a>container</h3><ul>
<li>列出当前所有正在运行的container<br><code>docker ps</code>  </li>
<li>列出所有的container<br><code>docker ps -a</code>  </li>
<li>列出最近一次启动的container<br><code>docker ps -l</code></li>
<li>停止所有的container，这样才能够删除其中的images：<br><code>docker stop $(docker ps -a -q)</code></li>
<li>删除所有container：<br><code>docker rm $(docker ps -a -q)</code></li>
</ul>
<p>更多命令参见:<a href="http://www.runoob.com/docker/docker-command-manual.html" target="_blank" rel="noopener">菜鸟教程</a></p>
<h2 id="最后"><a href="#最后" class="headerlink" title="最后"></a>最后</h2><p>Docker入门还是很简单的，本文简单的做了Docker的介绍、容器与镜像的相关内容还有常用的命令，希望对你有所帮助。</p>
<p>CSDN：<a href="http://blog.csdn.net/qqhjqs?viewmode=list" target="_blank" rel="noopener">http://blog.csdn.net/qqhjqs?viewmode=list</a><br>博客：<a href="http://vector4wang.tk/" target="_blank" rel="noopener">http://vector4wang.tk/</a><br>简书：<a href="https://www.jianshu.com/u/223a1314e818" target="_blank" rel="noopener">https://www.jianshu.com/u/223a1314e818</a><br>Github:<a href="https://github.com/vector4wang" target="_blank" rel="noopener">https://github.com/vector4wang</a><br>Gitee:<a href="https://gitee.com/backwxc" target="_blank" rel="noopener">https://gitee.com/backwxc</a><br>如果感觉有帮助的话，点个赞哦~</p>

      
    </div>

    

    
    
    

    <div>
          
            
          
    </div>

    

    
      <div>
        <div style="padding: 10px 0; margin: 20px auto; width: 90%; text-align: center;">
  <div></div>
  <button id="rewardButton" disable="enable" onclick="var qr = document.getElementById('QR'); if (qr.style.display === 'none') {qr.style.display='block';} else {qr.style.display='none'}">
    <span>打赏</span>
  </button>
  <div id="QR" style="display: none;">

    
      <div id="wechat" style="display: inline-block">
        <img id="wechat_qr" src="https://i.loli.net/2017/12/29/5a4632028eaeb.jpg" alt="wangxc 微信支付">
        <p>微信支付</p>
      </div>
    

    
      <div id="alipay" style="display: inline-block">
        <img id="alipay_qr" src="https://i.loli.net/2017/12/29/5a46320234b1d.jpg" alt="wangxc 支付宝">
        <p>支付宝</p>
      </div>
    

    

  </div>
</div>

      </div>
    

    
<div>
  
    <div>
    
        <div style="text-align:center;color: #ccc;font-size:14px;">
              -------------本文结束<i class="fa fa-paw"></i>感谢您的阅读-------------
        </div>
    
</div>

  
</div>
    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/Docker/" rel="tag"><i class="fa fa-tag"></i> Docker</a>
          
        </div>
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/2018/01/18/学习Docker之Docker初体验-SpringBoot集成Docker的部署、发布与应用/" rel="next" title="学习Docker之Docker初体验---SpringBoot集成Docker的部署、发布与应用">
                <i class="fa fa-chevron-left"></i> 学习Docker之Docker初体验---SpringBoot集成Docker的部署、发布与应用
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/2018/01/27/学习Docker之10张图带你深入理解Docker容器和镜像/" rel="prev" title="学习Docker之10张图带你深入理解Docker容器和镜像">
                学习Docker之10张图带你深入理解Docker容器和镜像 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          

  
    <div class="comments" id="comments">
    </div>
  



        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview-wrap">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview-wrap sidebar-panel">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
            
              <img class="site-author-image" itemprop="image" src="/images/avatar.jpg" alt="wangxc">
            
              <p class="site-author-name" itemprop="name">wangxc</p>
              <p class="site-description motion-element" itemprop="description">革命尚未成功，同志还需努力~</p>
          </div>

          
            <nav class="site-state motion-element">
              
                <div class="site-state-item site-state-posts">
                
                  <a href="/archives/">
                
                    <span class="site-state-item-count">83</span>
                    <span class="site-state-item-name">日志</span>
                  </a>
                </div>
              

              
                
                
                <div class="site-state-item site-state-categories">
                  <a href="/categories/index.html">
                    
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                    <span class="site-state-item-count">6</span>
                    <span class="site-state-item-name">分类</span>
                  </a>
                </div>
              

              
                
                
                <div class="site-state-item site-state-tags">
                  <a href="/tags/index.html">
                    
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                    <span class="site-state-item-count">124</span>
                    <span class="site-state-item-name">标签</span>
                  </a>
                </div>
              
            </nav>
          

          

          
            <div class="links-of-author motion-element">
              
                <span class="links-of-author-item">
                  <a href="https://github.com/vector4wang" target="_blank" title="GitHub" rel="external nofollow"><i class="fa fa-fw fa-github"></i>GitHub</a>
                  
                </span>
              
                <span class="links-of-author-item">
                  <a href="mailto:vector4wang@qq.com" target="_blank" title="E-Mail" rel="external nofollow"><i class="fa fa-fw fa-envelope"></i>E-Mail</a>
                  
                </span>
              
                <span class="links-of-author-item">
                  <a href="https://www.jianshu.com/u/223a1314e818" target="_blank" title="简书" rel="external nofollow"><i class="fa fa-fw fa-book"></i>简书</a>
                  
                </span>
              
                <span class="links-of-author-item">
                  <a href="http://blog.csdn.net/qqhjqs?viewmode=contents" target="_blank" title="CSDN" rel="external nofollow"><i class="fa fa-fw fa-crosshairs"></i>CSDN</a>
                  
                </span>
              
                <span class="links-of-author-item">
                  <a href="https://twitter.com/BMHJQS" target="_blank" title="Twitter" rel="external nofollow"><i class="fa fa-fw fa-twitter"></i>Twitter</a>
                  
                </span>
              
                <span class="links-of-author-item">
                  <a href="https://www.facebook.com/" target="_blank" title="FB Page" rel="external nofollow"><i class="fa fa-fw fa-facebook-official"></i>FB Page</a>
                  
                </span>
              
            </div>
          

          
          

          
          

          
            
          
          

        </div>
      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#问题"><span class="nav-number">1.</span> <span class="nav-text">问题</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#什么是Docker"><span class="nav-number">2.</span> <span class="nav-text">什么是Docker</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#镜像与容器"><span class="nav-number">3.</span> <span class="nav-text">镜像与容器</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Docker常用命令"><span class="nav-number">4.</span> <span class="nav-text">Docker常用命令</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#images"><span class="nav-number">4.1.</span> <span class="nav-text">images</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#container"><span class="nav-number">4.2.</span> <span class="nav-text">container</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#最后"><span class="nav-number">5.</span> <span class="nav-text">最后</span></a></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      
        <div class="back-to-top">
          <i class="fa fa-arrow-up"></i>
          
            <span id="scrollpercent"><span>0</span>%</span>
          
        </div>
      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <script async src="https://dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js"></script>
<div class="copyright">&copy; <span itemprop="copyrightYear">2020</span>
  <span class="with-love" id="animate">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">wangxc</span>

  

  
</div>


  


<div class="powered-by">
<i class="fa fa-user-md"></i><span id="busuanzi_container_site_pv">
  本站访客数:<span id="busuanzi_value_site_uv"></span>
</span>
</div>


  <div class="powered-by">由 <a class="theme-link" target="_blank" rel="external nofollow" href="https://hexo.io">Hexo</a> 强力驱动 v3.8.0</div>



  <span class="post-meta-divider">|</span>



  <div class="theme-info">主题 &mdash; <a class="theme-link" target="_blank" rel="external nofollow" href="https://theme-next.org">NexT.Mist</a> v6.3.0</div>




        








        
      </div>
    </footer>

    

    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>


























  
  
    <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
  


  


  <script type="text/javascript" src="/js/src/utils.js?v=6.3.0"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=6.3.0"></script>



  
  

  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=6.3.0"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=6.3.0"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=6.3.0"></script>



  



	





  





  








  <script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
  
  
  <script src="//unpkg.com/valine/dist/Valine.min.js"></script>
  
  <script type="text/javascript">
    var GUEST = ['nick','mail','link'];
    var guest = 'nick,mail,link';
    guest = guest.split(',').filter(function (item) {
      return GUEST.indexOf(item)>-1;
    });
    new Valine({
        el: '#comments' ,
        verify: false,
        notify: false,
        appId: 'YdGFHBfuDwObik8qwCeRAWgr-gzGzoHsz',
        appKey: 'oFpbJwmMQf98DfFDUlzE5Fai',
        placeholder: 'Just go go',
        avatar:'mm',
        guest_info:guest,
        pageSize:'10' || 10,
    });
  </script>



  





  

  

  

  

  
  

  

  

  

  

  

</body>
</html>
